<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="SucursalCreateDlg" widgetVar="SucursalCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateSucursalTitle}">
            <h:form id="SucursalCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{sucursalController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateSucursalLabel_idSucursal}" for="idSucursal" />
                        <p:inputText id="idSucursal" value="#{sucursalController.selected.idSucursal}" title="#{bundle.CreateSucursalTitle_idSucursal}" required="true" requiredMessage="#{bundle.CreateSucursalRequiredMessage_idSucursal}"/>
                        <p:outputLabel value="#{bundle.CreateSucursalLabel_nombre}" for="nombre" />
                        <p:inputText id="nombre" value="#{sucursalController.selected.nombre}" title="#{bundle.CreateSucursalTitle_nombre}" />
                        <p:outputLabel value="#{bundle.CreateSucursalLabel_prefijo}" for="prefijo" />
                        <p:inputText id="prefijo" value="#{sucursalController.selected.prefijo}" title="#{bundle.CreateSucursalTitle_prefijo}" />
                        <p:outputLabel value="#{bundle.CreateSucursalLabel_indHabilitadosucursal}" for="indHabilitadosucursal" />
                        <p:selectBooleanCheckbox id="indHabilitadosucursal" value="#{sucursalController.selected.indHabilitadosucursal}" required="true" requiredMessage="#{bundle.EditSucursalRequiredMessage_indHabilitadosucursal}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{sucursalController.create}" value="#{bundle.Save}" update="display,:SucursalListForm:datalist,:growl" oncomplete="handleSubmit(args,'SucursalCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="SucursalCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
